/*
 * @Description: 
 * @Date: 2020-12-08 10:01:36
 * @LastEditors: lother
 * @LastEditTime: 2020-12-14 16:00:14
 * @FilePath: \AccounOpening-WEB\src\components\render\slots\el-upload.js
 */
import store from '@/store'
import imgList from '@/assets/images/identity.png'
var langTail = store.state.settings.langTail
export default {
  'list-type': (h, conf, key) => {
    const list = []
    const config = conf
    if (conf['list-type'] === 'picture-card') {
      list.push(<div class="el-upload--picture-card"><p><i  class="el-icon-plus"></i><span class="text-upload">{config['title_'+langTail]}</span></p></div>)
    }
    if (config.showTip) {
      list.push(
        <div slot="tip" class="el-upload__tip">只能上传不超过 {config.fileSize}{config.sizeUnit} 的{conf.accept}文件</div>
      )
    }
    return list
  },
  'src-type':(h,conf,key)=>{
    var  img= h('img',{
      style:{
       width:'200px'
      },
       attrs:{
         src:imgList
       }
     })
     return img
  }
}